In conventional technology, there are image-forming devices configured to detect the quantity of developer remaining in a replaceable cartridge optically. One such device provides a pair of light-transmissive windows in opposing side walls of the cartridge. The device irradiates light into one of the light-transmissive windows and detects light exiting from the other, then determines the quantity of developer remaining in the cartridge based on a signal acquired as a result of this detection. Thus, the image-forming device can make such determinations as when the cartridge needs to be replaced, for example, based on the quantity of developer detected in the cartridge.